#!/bin/bash
if [ `whoami` != 'root' ]; then
	echo "Please run this program as root (type: sudo ./fixmodules)"
	exit 1
fi
if [ `uname -r` != '2.6.15-27-386' ]; then
	echo "You aren't using the correct linux kernel version, please use 2.6.15-27 or compile the code yourself"
	exit 1
fi
echo Updating the netfilter kernel modules...
tar -xvzf kernel_modules.tgz
mv ipv4/netfilter/*.ko /lib/modules/2.6.15-27-386/kernel/net/ipv4/netfilter/
mv netfilter/*.ko /lib/modules/2.6.15-27-386/kernel/net/netfilter/
rm -r ipv4 netfilter
echo Done.
